<!--
 * @Description: 
 * @version: 
 * @Author: 171
 * @Date: 2022-09-01 22:44:13
 * @LastEditors: 171
 * @LastEditTime: 2022-09-02 10:12:30
-->
<!--
 * @Description: 
 * @version: 
 * @Author: 171
 * @Date: 2022-09-01 16:56:25
 * @LastEditors: 171
 * @LastEditTime: 2022-09-01 19:20:26
-->

<script setup lang='ts'>

  import { getCurrentInstance, onMounted } from 'vue'
  import type { ComponentInternalInstance } from 'vue';
  import useStore from '../../stores'
  import MyMap from './Map.vue';
  import Display from './Display.vue';
  import MyTable from './Table.vue';

  const { listState } = useStore()

  const { appContext } = getCurrentInstance() as ComponentInternalInstance // 用类型断言，用<>会报错
  appContext.config.globalProperties.$loading.show();

  await listState.getList() // 等待数据的获取

  appContext.config.globalProperties.$loading.hide();
  
  
  
    
</script>

<template>

  <div class="box">

    <Display></Display>
    <MyMap></MyMap>
    <MyTable></MyTable>
    
  </div>

</template>

<style lang='less' scoped>
  .box{
    width: 100%;
    height: 100%;
    display: flex;
  }
</style>